﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="net.fckeditor.*" %>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>内容修改</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" id="css" href="Resource/css/main.css">
	</head>
	<%
	
		FCKeditor fckEditor = new FCKeditor(request, "content");
		fckEditor.setBasePath( "/manage/fckeditor/" ) ; 
		//fckEditor.setWidth("400");
		fckEditor.setHeight("400");
		//fckEditor.setBasePath("./manage/");
		String id = (String)request.getAttribute("id");
		String type = (String)request.getAttribute("type");
		String content = (String)request.getAttribute("content");
		String title = (String)request.getAttribute("title");
	%>
	
	<script language="javascript">
		function returnBack(){
			location.href = "listContent.do";
		}
		</script>
	<body>
			<div id="framed">
  	<h2>内容发布</h2>
  </div>
  
  <div>
  	<form action="updateContent.do" method="post">
  	<label for="type" class="select">文章类型</label>
		<select size="1" id="select" name="type">
			<option value="1" <%if("1".equals(type)) out.print("selected");%>>专题信息</option>
			<option value="2" <%if("2".equals(type)) out.print("selected");%>>站内新闻</option>
			<option value="3" <%if("3".equals(type)) out.print("selected");%>>促销广告</option>
			<option value="4" <%if("4".equals(type)) out.print("selected");%>>帮助信息</option>
		</select>
		
		<br />
		
		<label for="title" class="text">文章标题</label>
		<input type="text" name="title" value="<%=title%>"/>
		<input type="hidden" name="id" value="<%=id%>"/>
  	<!--
		<ul>
			<li><FCK:check command="CompatibleBrowser" /></li>
			<li><FCK:check command="GetResources" /></li>
			<li><FCK:check command="FileUpload" /></li>
			<li><FCK:check command="CreateFolder" /></li>
		</ul>
		-->
		<hr />
		
		<%
			fckEditor.setValue(content);
			out.println(fckEditor);
		%>
		<br />
		<input type="submit" value="保存" />
		<input type="button" onclick="returnBack()" value="返回" />
		</form>
		
	</div>
	</body>
</html>